//页面缩放
var pageObj = {
    scale: 1
}
var scale = 1
$('.scale').text(pageObj.scale)
Object.defineProperty(pageObj, 'scale', {
    set: function (val) {
        console.log('发生变化', val)
        $('.scale').text(val)
    },
})
var amplify = function (num) {
    if (num == 1) {
        if (scale >= 1.8) {
            return false
        }
        scale = Number((scale + 0.1).toFixed(1))
        changeScale(scale)
    } else {
        if (scale <= 0.3) {
            return false
        }
        scale = Number((scale - 0.1).toFixed(1))
        changeScale(scale)
    }

}
var changeScale = function (num) {
    scale = num;
    pageObj.scale = num
    $('.content').css({
        '-webkit-transform': 'scale(' + num + ')',
        '-moz-transform': 'scale(' + num + ')',
        '-ms-transform': 'scale(' + num + ')',
        '-o-transform': 'scale(' + num + ')',
        'transform': 'scale(' + num + ')'
    })
}